#include "common.hpp"

bool ascend_comp(int a, int b)
{
    return a < b;
}

bool descend_comp(int a, int b)
{
    return a > b;
}

void Basic()
{
    std::vector<int> list{2, 6, 3, 5, 7, 9, 0, 1};
    std::sort(list.begin(), list.end(), ascend_comp);
    Print(list);
    std::sort(list.begin(), list.end(), descend_comp);
    Print(list);
    std::vector<int> temp{-1, -8, -4};
    list.swap(temp);
    Print(list);
    printf("swap\n");
    Print(temp);
    list.assign(10, 6);
    Print(list);
    list.assign(temp.begin() + 1, temp.end() - 1);
    printf("assign\n");
    Print(list);
    Print(temp);
}

int main(int argc, char **argv)
{
    Basic();
    return 1;
}